import request from '@/utils/request'

export function captcha() {
  return request({
    url: '/admin/api/captcha?t=' + (new Date()).getTime()
    , method: 'get'
  })
}

export function login(data) {
  return request({
    url: '/admin/api/login'
    , method: 'post'
    , data: data
    , apiDataEncrypt: true
  })
}

export function logout() {
  return request({
    url: '/admin/api/logout'
    , method: 'post'
  })
}

export function getInfo() {
  return request({
    url: '/admin/api/info'
    , method: 'get'
  })
}
